var a = 0;
var icon = "#fUI/Basic.img/BtMin2/normal/0#";
var iconEvent = "#fEffect/CharacterEff/1112905/0/0#";
var ttt4 = "#fUI/UIWindow/Quest/icon5/1#";
var icon2 = "#fEffect/CharacterEff/1082565/2/0#";
var icon3 = "#fEffect/ItemEff/1048000/0/0#";
var List = Array(Array(iconEvent + " #e#d强化品级", 0, 1, 1022003), Array(iconEvent + " #d装备制作", 24, 1), Array(iconEvent + " #d时装强化", 0, 1, 9000069), Array(iconEvent + " #d武器破功", 1000, 1), Array(iconEvent + " #d蜡笔潜能", 1001, 1), Array(iconEvent + " #d翅膀进阶", 500, 1, 9900004), Array(iconEvent + " #d图腾合成", 0, 1, 9201131), Array(iconEvent + " #r[NEW]#d口袋装备极品合成", 2, 1, 9201131));
var text;

function start() {
    a = -1;
    action(1, 0, 0)
}

function action(g, f, e) {
    if (g == -1) {
        cm.dispose()
    } else {
        if (g == 1) {
            a++
        } else {
            a--
        }
        if (a == -1) {
            cm.dispose()
        } else {
            if (a == 0) {
                text = "";
                for (var c = 0; c < 2; c++) {
                    ListFor(c)
                }
                text += "\r\n\r\n\r\n#e#b" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + " 提升面板 " + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "#n#k\r\n";
                cm.askMenu(text)
            } else {
                if (a == 1) {
                    var d = List[e][1];
                    cm.dispose();
                    var b = 9900003;
                    if (List[e][3] != null) {
                        b = List[e][3]
                    }
                    cm.openNpc(b, d)
                }
            }
        }
    }
}

function ListFor(d) {
    switch (d) {
        case 1:
            text += "#e#d" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "" + icon3 + "#n#k\r\n";
            break
    }
    var b = 0;
    for (var c = 0; c < List.length; c++) {
        if (List[c][2] == d) {
            if (b == 2) {
                text += "  #L" + c + "#" + List[c][0] + "#l\r\n";
                b = 0
            } else {
                text += "  #L" + c + "#" + List[c][0] + "#l";
                b++
            }
        }
    }
    text += "#e"
}
var status = -1;